//
// IDriver.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;
import org.ryzom.nel.misc.CRefCount;
import org.ryzom.nel.misc.CVector;
import org.ryzom.nel.misc.CVectorD;

public class IDriver extends CRefCount {
  private long swigCPtr;

  public IDriver(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.IDriver_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(IDriver obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_IDriver(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public static long getInterfaceVersion() {
    return nel3dJNI.IDriver_InterfaceVersion_get();
  }

  public boolean init(long windowIcon, SWIGTYPE_p_f_void__void exitFunc) {
    return nel3dJNI.IDriver_init__SWIG_0(swigCPtr, this, windowIcon, SWIGTYPE_p_f_void__void.getCPtr(exitFunc));
  }

  public boolean init(long windowIcon) {
    return nel3dJNI.IDriver_init__SWIG_1(swigCPtr, this, windowIcon);
  }

  public boolean init() {
    return nel3dJNI.IDriver_init__SWIG_2(swigCPtr, this);
  }

  public boolean isLost() {
    return nel3dJNI.IDriver_isLost(swigCPtr, this);
  }

  public void disableHardwareVertexProgram() {
    nel3dJNI.IDriver_disableHardwareVertexProgram(swigCPtr, this);
  }

  public void disableHardwareVertexArrayAGP() {
    nel3dJNI.IDriver_disableHardwareVertexArrayAGP(swigCPtr, this);
  }

  public void disableHardwareTextureShader() {
    nel3dJNI.IDriver_disableHardwareTextureShader(swigCPtr, this);
  }

  public boolean setDisplay(int wnd, GfxMode mode, boolean show, boolean resizeable) {
    return nel3dJNI.IDriver_setDisplay__SWIG_0(swigCPtr, this, wnd, GfxMode.getCPtr(mode), mode, show, resizeable);
  }

  public boolean setDisplay(int wnd, GfxMode mode, boolean show) {
    return nel3dJNI.IDriver_setDisplay__SWIG_1(swigCPtr, this, wnd, GfxMode.getCPtr(mode), mode, show);
  }

  public boolean setDisplay(int wnd, GfxMode mode) {
    return nel3dJNI.IDriver_setDisplay__SWIG_2(swigCPtr, this, wnd, GfxMode.getCPtr(mode), mode);
  }

  public boolean setMode(GfxMode mode) {
    return nel3dJNI.IDriver_setMode(swigCPtr, this, GfxMode.getCPtr(mode), mode);
  }

  public boolean getModes(SWIGTYPE_p_std__vectorT_NL3D__GfxMode_t modes) {
    return nel3dJNI.IDriver_getModes(swigCPtr, this, SWIGTYPE_p_std__vectorT_NL3D__GfxMode_t.getCPtr(modes));
  }

  public void setWindowTitle(SWIGTYPE_p_ucstring title) {
    nel3dJNI.IDriver_setWindowTitle(swigCPtr, this, SWIGTYPE_p_ucstring.getCPtr(title));
  }

  public void setWindowIcon(SWIGTYPE_p_std__vectorT_NLMISC__CBitmap_t bitmaps) {
    nel3dJNI.IDriver_setWindowIcon(swigCPtr, this, SWIGTYPE_p_std__vectorT_NLMISC__CBitmap_t.getCPtr(bitmaps));
  }

  public void setWindowPos(int x, int y) {
    nel3dJNI.IDriver_setWindowPos(swigCPtr, this, x, y);
  }

  public void showWindow(boolean show) {
    nel3dJNI.IDriver_showWindow(swigCPtr, this, show);
  }

  public boolean getCurrentScreenMode(GfxMode mode) {
    return nel3dJNI.IDriver_getCurrentScreenMode(swigCPtr, this, GfxMode.getCPtr(mode), mode);
  }

  public void beginDialogMode() {
    nel3dJNI.IDriver_beginDialogMode(swigCPtr, this);
  }

  public void endDialogMode() {
    nel3dJNI.IDriver_endDialogMode(swigCPtr, this);
  }

  public int getDisplay() {
    return nel3dJNI.IDriver_getDisplay(swigCPtr, this);
  }

  public boolean setMonitorColorProperties(CMonitorColorProperties properties) {
    return nel3dJNI.IDriver_setMonitorColorProperties(swigCPtr, this, CMonitorColorProperties.getCPtr(properties), properties);
  }

  public SWIGTYPE_p_f_void__void getWindowProc() {
    long cPtr = nel3dJNI.IDriver_getWindowProc(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_f_void__void(cPtr, false);
  }

  public boolean activate() {
    return nel3dJNI.IDriver_activate(swigCPtr, this);
  }

  public long getNbTextureStages() {
    return nel3dJNI.IDriver_getNbTextureStages(swigCPtr, this);
  }

  public boolean isTextureExist(ITexture tex) {
    return nel3dJNI.IDriver_isTextureExist(swigCPtr, this, ITexture.getCPtr(tex), tex);
  }

  public SWIGTYPE_p_NLMISC__IEventEmitter getEventEmitter() {
    long cPtr = nel3dJNI.IDriver_getEventEmitter(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IEventEmitter(cPtr, false);
  }

  public boolean clear2D(CRGBA rgba) {
    return nel3dJNI.IDriver_clear2D(swigCPtr, this, CRGBA.getCPtr(rgba), rgba);
  }

  public boolean clearZBuffer(float zval) {
    return nel3dJNI.IDriver_clearZBuffer__SWIG_0(swigCPtr, this, zval);
  }

  public boolean clearZBuffer() {
    return nel3dJNI.IDriver_clearZBuffer__SWIG_1(swigCPtr, this);
  }

  public boolean clearStencilBuffer(float stencilval) {
    return nel3dJNI.IDriver_clearStencilBuffer__SWIG_0(swigCPtr, this, stencilval);
  }

  public boolean clearStencilBuffer() {
    return nel3dJNI.IDriver_clearStencilBuffer__SWIG_1(swigCPtr, this);
  }

  public void setColorMask(boolean bRed, boolean bGreen, boolean bBlue, boolean bAlpha) {
    nel3dJNI.IDriver_setColorMask(swigCPtr, this, bRed, bGreen, bBlue, bAlpha);
  }

  public void setDepthRange(float znear, float zfar) {
    nel3dJNI.IDriver_setDepthRange(swigCPtr, this, znear, zfar);
  }

  public void getDepthRange(SWIGTYPE_p_float znear, SWIGTYPE_p_float zfar) {
    nel3dJNI.IDriver_getDepthRange(swigCPtr, this, SWIGTYPE_p_float.getCPtr(znear), SWIGTYPE_p_float.getCPtr(zfar));
  }

  public boolean setupTexture(ITexture tex) {
    return nel3dJNI.IDriver_setupTexture(swigCPtr, this, ITexture.getCPtr(tex), tex);
  }

  public boolean setupTextureEx(ITexture tex, boolean bUpload, SWIGTYPE_p_bool bAllUploaded, boolean bMustRecreateSharedTexture) {
    return nel3dJNI.IDriver_setupTextureEx__SWIG_0(swigCPtr, this, ITexture.getCPtr(tex), tex, bUpload, SWIGTYPE_p_bool.getCPtr(bAllUploaded), bMustRecreateSharedTexture);
  }

  public boolean setupTextureEx(ITexture tex, boolean bUpload, SWIGTYPE_p_bool bAllUploaded) {
    return nel3dJNI.IDriver_setupTextureEx__SWIG_1(swigCPtr, this, ITexture.getCPtr(tex), tex, bUpload, SWIGTYPE_p_bool.getCPtr(bAllUploaded));
  }

  public boolean uploadTexture(ITexture tex, SWIGTYPE_p_NLMISC__CRect rect, short nNumMipMap) {
    return nel3dJNI.IDriver_uploadTexture(swigCPtr, this, ITexture.getCPtr(tex), tex, SWIGTYPE_p_NLMISC__CRect.getCPtr(rect), nNumMipMap);
  }

  public boolean uploadTextureCube(ITexture tex, SWIGTYPE_p_NLMISC__CRect rect, short nNumMipMap, short nNumFace) {
    return nel3dJNI.IDriver_uploadTextureCube(swigCPtr, this, ITexture.getCPtr(tex), tex, SWIGTYPE_p_NLMISC__CRect.getCPtr(rect), nNumMipMap, nNumFace);
  }

  public boolean invalidateShareTexture(ITexture arg0) {
    return nel3dJNI.IDriver_invalidateShareTexture(swigCPtr, this, ITexture.getCPtr(arg0), arg0);
  }

  public static void getTextureShareName(ITexture tex, SWIGTYPE_p_std__string output) {
    nel3dJNI.IDriver_getTextureShareName(ITexture.getCPtr(tex), tex, SWIGTYPE_p_std__string.getCPtr(output));
  }

  public void forceDXTCCompression(boolean dxtcComp) {
    nel3dJNI.IDriver_forceDXTCCompression(swigCPtr, this, dxtcComp);
  }

  public void forceTextureResize(long divisor) {
    nel3dJNI.IDriver_forceTextureResize(swigCPtr, this, divisor);
  }

  public void forceNativeFragmentPrograms(boolean nativeOnly) {
    nel3dJNI.IDriver_forceNativeFragmentPrograms(swigCPtr, this, nativeOnly);
  }

  public boolean setupMaterial(CMaterial mat) {
    return nel3dJNI.IDriver_setupMaterial(swigCPtr, this, CMaterial.getCPtr(mat), mat);
  }

  public boolean activeShader(CShader shd) {
    return nel3dJNI.IDriver_activeShader(swigCPtr, this, CShader.getCPtr(shd), shd);
  }

  public void startSpecularBatch() {
    nel3dJNI.IDriver_startSpecularBatch(swigCPtr, this);
  }

  public void endSpecularBatch() {
    nel3dJNI.IDriver_endSpecularBatch(swigCPtr, this);
  }

  public int beginMaterialMultiPass() {
    return nel3dJNI.IDriver_beginMaterialMultiPass(swigCPtr, this);
  }

  public void setupMaterialPass(long pass) {
    nel3dJNI.IDriver_setupMaterialPass(swigCPtr, this, pass);
  }

  public void endMaterialMultiPass() {
    nel3dJNI.IDriver_endMaterialMultiPass(swigCPtr, this);
  }

  public void setFrustum(float left, float right, float bottom, float top, float znear, float zfar, boolean perspective) {
    nel3dJNI.IDriver_setFrustum__SWIG_0(swigCPtr, this, left, right, bottom, top, znear, zfar, perspective);
  }

  public void setFrustum(float left, float right, float bottom, float top, float znear, float zfar) {
    nel3dJNI.IDriver_setFrustum__SWIG_1(swigCPtr, this, left, right, bottom, top, znear, zfar);
  }

  public void setFrustumMatrix(SWIGTYPE_p_NLMISC__CMatrix frust) {
    nel3dJNI.IDriver_setFrustumMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(frust));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getFrustumMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.IDriver_getFrustumMatrix(swigCPtr, this), true);
  }

  public float getClipSpaceZMin() {
    return nel3dJNI.IDriver_getClipSpaceZMin(swigCPtr, this);
  }

  public void setupViewMatrix(SWIGTYPE_p_NLMISC__CMatrix mtx) {
    nel3dJNI.IDriver_setupViewMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(mtx));
  }

  public void setupViewMatrixEx(SWIGTYPE_p_NLMISC__CMatrix mtx, CVector cameraPos) {
    nel3dJNI.IDriver_setupViewMatrixEx(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(mtx), CVector.getCPtr(cameraPos), cameraPos);
  }

  public void setupModelMatrix(SWIGTYPE_p_NLMISC__CMatrix mtx) {
    nel3dJNI.IDriver_setupModelMatrix(swigCPtr, this, SWIGTYPE_p_NLMISC__CMatrix.getCPtr(mtx));
  }

  public SWIGTYPE_p_NLMISC__CMatrix getViewMatrix() {
    return new SWIGTYPE_p_NLMISC__CMatrix(nel3dJNI.IDriver_getViewMatrix(swigCPtr, this), true);
  }

  public void forceNormalize(boolean normalize) {
    nel3dJNI.IDriver_forceNormalize(swigCPtr, this, normalize);
  }

  public boolean isForceNormalize() {
    return nel3dJNI.IDriver_isForceNormalize(swigCPtr, this);
  }

  public void getNumPerStageConstant(SWIGTYPE_p_unsigned_int lightedMaterial, SWIGTYPE_p_unsigned_int unlightedMaterial) {
    nel3dJNI.IDriver_getNumPerStageConstant(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(lightedMaterial), SWIGTYPE_p_unsigned_int.getCPtr(unlightedMaterial));
  }

  public boolean supportVertexBufferHard() {
    return nel3dJNI.IDriver_supportVertexBufferHard(swigCPtr, this);
  }

  public boolean supportVolatileVertexBuffer() {
    return nel3dJNI.IDriver_supportVolatileVertexBuffer(swigCPtr, this);
  }

  public boolean supportIndexOffset() {
    return nel3dJNI.IDriver_supportIndexOffset(swigCPtr, this);
  }

  public boolean slowUnlockVertexBufferHard() {
    return nel3dJNI.IDriver_slowUnlockVertexBufferHard(swigCPtr, this);
  }

  public boolean getStaticMemoryToVRAM() {
    return nel3dJNI.IDriver_getStaticMemoryToVRAM(swigCPtr, this);
  }

  public void setStaticMemoryToVRAM(boolean staticMemoryToVRAM) {
    nel3dJNI.IDriver_setStaticMemoryToVRAM(swigCPtr, this, staticMemoryToVRAM);
  }

  public long getResetCounter() {
    return nel3dJNI.IDriver_getResetCounter(swigCPtr, this);
  }

  public long getMaxVerticesByVertexBufferHard() {
    return nel3dJNI.IDriver_getMaxVerticesByVertexBufferHard(swigCPtr, this);
  }

  public boolean initVertexBufferHard(long agpMem, long vramMem) {
    return nel3dJNI.IDriver_initVertexBufferHard__SWIG_0(swigCPtr, this, agpMem, vramMem);
  }

  public boolean initVertexBufferHard(long agpMem) {
    return nel3dJNI.IDriver_initVertexBufferHard__SWIG_1(swigCPtr, this, agpMem);
  }

  public long getAvailableVertexAGPMemory() {
    return nel3dJNI.IDriver_getAvailableVertexAGPMemory(swigCPtr, this);
  }

  public long getAvailableVertexVRAMMemory() {
    return nel3dJNI.IDriver_getAvailableVertexVRAMMemory(swigCPtr, this);
  }

  public boolean activeVertexBuffer(CVertexBuffer VB) {
    return nel3dJNI.IDriver_activeVertexBuffer(swigCPtr, this, CVertexBuffer.getCPtr(VB), VB);
  }

  public boolean activeIndexBuffer(CIndexBuffer IB) {
    return nel3dJNI.IDriver_activeIndexBuffer(swigCPtr, this, CIndexBuffer.getCPtr(IB), IB);
  }

  public boolean renderLines(CMaterial mat, long firstIndex, long nlines) {
    return nel3dJNI.IDriver_renderLines(swigCPtr, this, CMaterial.getCPtr(mat), mat, firstIndex, nlines);
  }

  public boolean renderTriangles(CMaterial mat, long firstIndex, long ntris) {
    return nel3dJNI.IDriver_renderTriangles(swigCPtr, this, CMaterial.getCPtr(mat), mat, firstIndex, ntris);
  }

  public boolean renderSimpleTriangles(long firstIndex, long ntris) {
    return nel3dJNI.IDriver_renderSimpleTriangles(swigCPtr, this, firstIndex, ntris);
  }

  public boolean renderRawPoints(CMaterial mat, long startVertex, long numPoints) {
    return nel3dJNI.IDriver_renderRawPoints(swigCPtr, this, CMaterial.getCPtr(mat), mat, startVertex, numPoints);
  }

  public boolean renderRawLines(CMaterial mat, long startVertex, long numTri) {
    return nel3dJNI.IDriver_renderRawLines(swigCPtr, this, CMaterial.getCPtr(mat), mat, startVertex, numTri);
  }

  public boolean renderRawTriangles(CMaterial mat, long startVertex, long numTri) {
    return nel3dJNI.IDriver_renderRawTriangles(swigCPtr, this, CMaterial.getCPtr(mat), mat, startVertex, numTri);
  }

  public boolean renderLinesWithIndexOffset(CMaterial mat, long firstIndex, long nlines, long indexOffset) {
    return nel3dJNI.IDriver_renderLinesWithIndexOffset(swigCPtr, this, CMaterial.getCPtr(mat), mat, firstIndex, nlines, indexOffset);
  }

  public boolean renderTrianglesWithIndexOffset(CMaterial mat, long firstIndex, long ntris, long indexOffset) {
    return nel3dJNI.IDriver_renderTrianglesWithIndexOffset(swigCPtr, this, CMaterial.getCPtr(mat), mat, firstIndex, ntris, indexOffset);
  }

  public boolean renderSimpleTrianglesWithIndexOffset(long firstIndex, long ntris, long indexOffset) {
    return nel3dJNI.IDriver_renderSimpleTrianglesWithIndexOffset(swigCPtr, this, firstIndex, ntris, indexOffset);
  }

  public boolean renderRawQuads(CMaterial mat, long startVertex, long numQuads) {
    return nel3dJNI.IDriver_renderRawQuads(swigCPtr, this, CMaterial.getCPtr(mat), mat, startVertex, numQuads);
  }

  public void mapTextureStageToUV(long stage, long uv) {
    nel3dJNI.IDriver_mapTextureStageToUV(swigCPtr, this, stage, uv);
  }

  public boolean swapBuffers() {
    return nel3dJNI.IDriver_swapBuffers(swigCPtr, this);
  }

  public boolean copyTextToClipboard(SWIGTYPE_p_ucstring text) {
    return nel3dJNI.IDriver_copyTextToClipboard(swigCPtr, this, SWIGTYPE_p_ucstring.getCPtr(text));
  }

  public boolean pasteTextFromClipboard(SWIGTYPE_p_ucstring text) {
    return nel3dJNI.IDriver_pasteTextFromClipboard(swigCPtr, this, SWIGTYPE_p_ucstring.getCPtr(text));
  }

  public void setSwapVBLInterval(long interval) {
    nel3dJNI.IDriver_setSwapVBLInterval(swigCPtr, this, interval);
  }

  public long getSwapVBLInterval() {
    return nel3dJNI.IDriver_getSwapVBLInterval(swigCPtr, this);
  }

  public void profileRenderedPrimitives(CPrimitiveProfile pIn, CPrimitiveProfile pOut) {
    nel3dJNI.IDriver_profileRenderedPrimitives(swigCPtr, this, CPrimitiveProfile.getCPtr(pIn), pIn, CPrimitiveProfile.getCPtr(pOut), pOut);
  }

  public long profileAllocatedTextureMemory() {
    return nel3dJNI.IDriver_profileAllocatedTextureMemory(swigCPtr, this);
  }

  public long profileSetupedMaterials() {
    return nel3dJNI.IDriver_profileSetupedMaterials(swigCPtr, this);
  }

  public long profileSetupedModelMatrix() {
    return nel3dJNI.IDriver_profileSetupedModelMatrix(swigCPtr, this);
  }

  public void enableUsedTextureMemorySum(boolean enable) {
    nel3dJNI.IDriver_enableUsedTextureMemorySum__SWIG_0(swigCPtr, this, enable);
  }

  public void enableUsedTextureMemorySum() {
    nel3dJNI.IDriver_enableUsedTextureMemorySum__SWIG_1(swigCPtr, this);
  }

  public long getUsedTextureMemory() {
    return nel3dJNI.IDriver_getUsedTextureMemory(swigCPtr, this);
  }

  public void startProfileVBHardLock() {
    nel3dJNI.IDriver_startProfileVBHardLock(swigCPtr, this);
  }

  public void endProfileVBHardLock(Vector_String result) {
    nel3dJNI.IDriver_endProfileVBHardLock(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void profileVBHardAllocation(Vector_String result) {
    nel3dJNI.IDriver_profileVBHardAllocation(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void startProfileIBLock() {
    nel3dJNI.IDriver_startProfileIBLock(swigCPtr, this);
  }

  public void endProfileIBLock(Vector_String result) {
    nel3dJNI.IDriver_endProfileIBLock(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void profileIBAllocation(Vector_String result) {
    nel3dJNI.IDriver_profileIBAllocation(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public void profileTextureUsage(Vector_String result) {
    nel3dJNI.IDriver_profileTextureUsage(swigCPtr, this, Vector_String.getCPtr(result), result);
  }

  public boolean fogEnabled() {
    return nel3dJNI.IDriver_fogEnabled(swigCPtr, this);
  }

  public void enableFog(boolean enable) {
    nel3dJNI.IDriver_enableFog(swigCPtr, this, enable);
  }

  public void setupFog(float start, float end, CRGBA color) {
    nel3dJNI.IDriver_setupFog(swigCPtr, this, start, end, CRGBA.getCPtr(color), color);
  }

  public float getFogStart() {
    return nel3dJNI.IDriver_getFogStart(swigCPtr, this);
  }

  public float getFogEnd() {
    return nel3dJNI.IDriver_getFogEnd(swigCPtr, this);
  }

  public CRGBA getFogColor() {
    return new CRGBA(nel3dJNI.IDriver_getFogColor(swigCPtr, this), true);
  }

  public boolean release() {
    return nel3dJNI.IDriver_release(swigCPtr, this);
  }

  public boolean isActive() {
    return nel3dJNI.IDriver_isActive(swigCPtr, this);
  }

  public short getBitPerPixel() {
    return nel3dJNI.IDriver_getBitPerPixel(swigCPtr, this);
  }

  public IDriver.TMessageBoxId systemMessageBox(String message, String title, IDriver.TMessageBoxType type, IDriver.TMessageBoxIcon icon) {
    return IDriver.TMessageBoxId.swigToEnum(nel3dJNI.IDriver_systemMessageBox__SWIG_0(swigCPtr, this, message, title, type.swigValue(), icon.swigValue()));
  }

  public IDriver.TMessageBoxId systemMessageBox(String message, String title, IDriver.TMessageBoxType type) {
    return IDriver.TMessageBoxId.swigToEnum(nel3dJNI.IDriver_systemMessageBox__SWIG_1(swigCPtr, this, message, title, type.swigValue()));
  }

  public IDriver.TMessageBoxId systemMessageBox(String message, String title) {
    return IDriver.TMessageBoxId.swigToEnum(nel3dJNI.IDriver_systemMessageBox__SWIG_2(swigCPtr, this, message, title));
  }

  public void setupViewport(CViewport viewport) {
    nel3dJNI.IDriver_setupViewport(swigCPtr, this, CViewport.getCPtr(viewport), viewport);
  }

  public void getViewport(CViewport viewport) {
    nel3dJNI.IDriver_getViewport(swigCPtr, this, CViewport.getCPtr(viewport), viewport);
  }

  public void setupScissor(CScissor scissor) {
    nel3dJNI.IDriver_setupScissor(swigCPtr, this, CScissor.getCPtr(scissor), scissor);
  }

  public long getImplementationVersion() {
    return nel3dJNI.IDriver_getImplementationVersion(swigCPtr, this);
  }

  public String getDriverInformation() {
    return nel3dJNI.IDriver_getDriverInformation(swigCPtr, this);
  }

  public String getVideocardInformation() {
    return nel3dJNI.IDriver_getVideocardInformation(swigCPtr, this);
  }

  public void showCursor(boolean b) {
    nel3dJNI.IDriver_showCursor(swigCPtr, this, b);
  }

  public void setMousePos(float x, float y) {
    nel3dJNI.IDriver_setMousePos(swigCPtr, this, x, y);
  }

  public SWIGTYPE_p_NLMISC__IMouseDevice enableLowLevelMouse(boolean enable, boolean exclusive) {
    long cPtr = nel3dJNI.IDriver_enableLowLevelMouse(swigCPtr, this, enable, exclusive);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IMouseDevice(cPtr, false);
  }

  public SWIGTYPE_p_NLMISC__IKeyboardDevice enableLowLevelKeyboard(boolean enable) {
    long cPtr = nel3dJNI.IDriver_enableLowLevelKeyboard(swigCPtr, this, enable);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IKeyboardDevice(cPtr, false);
  }

  public long getDoubleClickDelay(boolean hardwareMouse) {
    return nel3dJNI.IDriver_getDoubleClickDelay(swigCPtr, this, hardwareMouse);
  }

  public void setCapture(boolean b) {
    nel3dJNI.IDriver_setCapture(swigCPtr, this, b);
  }

  public boolean isSystemCursorCaptured() {
    return nel3dJNI.IDriver_isSystemCursorCaptured(swigCPtr, this);
  }

  public void addCursor(String name, SWIGTYPE_p_NLMISC__CBitmap bitmap) {
    nel3dJNI.IDriver_addCursor(swigCPtr, this, name, SWIGTYPE_p_NLMISC__CBitmap.getCPtr(bitmap));
  }

  public void setCursor(String name, CRGBA col, short rot, int hotSpotX, int hotSpotY, boolean forceRebuild) {
    nel3dJNI.IDriver_setCursor__SWIG_0(swigCPtr, this, name, CRGBA.getCPtr(col), col, rot, hotSpotX, hotSpotY, forceRebuild);
  }

  public void setCursor(String name, CRGBA col, short rot, int hotSpotX, int hotSpotY) {
    nel3dJNI.IDriver_setCursor__SWIG_1(swigCPtr, this, name, CRGBA.getCPtr(col), col, rot, hotSpotX, hotSpotY);
  }

  public void setCursorScale(float scale) {
    nel3dJNI.IDriver_setCursorScale(swigCPtr, this, scale);
  }

  public SWIGTYPE_p_NLMISC__IInputDeviceManager getLowLevelInputDeviceManager() {
    long cPtr = nel3dJNI.IDriver_getLowLevelInputDeviceManager(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__IInputDeviceManager(cPtr, false);
  }

  public void getWindowSize(SWIGTYPE_p_unsigned_int width, SWIGTYPE_p_unsigned_int height) {
    nel3dJNI.IDriver_getWindowSize(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(width), SWIGTYPE_p_unsigned_int.getCPtr(height));
  }

  public void getWindowPos(SWIGTYPE_p_int x, SWIGTYPE_p_int y) {
    nel3dJNI.IDriver_getWindowPos(swigCPtr, this, SWIGTYPE_p_int.getCPtr(x), SWIGTYPE_p_int.getCPtr(y));
  }

  public void getBuffer(SWIGTYPE_p_CBitmap bitmap) {
    nel3dJNI.IDriver_getBuffer(swigCPtr, this, SWIGTYPE_p_CBitmap.getCPtr(bitmap));
  }

  public void getZBuffer(SWIGTYPE_p_std__vectorT_float_t zbuffer) {
    nel3dJNI.IDriver_getZBuffer(swigCPtr, this, SWIGTYPE_p_std__vectorT_float_t.getCPtr(zbuffer));
  }

  public void getBufferPart(SWIGTYPE_p_CBitmap bitmap, SWIGTYPE_p_NLMISC__CRect rect) {
    nel3dJNI.IDriver_getBufferPart(swigCPtr, this, SWIGTYPE_p_CBitmap.getCPtr(bitmap), SWIGTYPE_p_NLMISC__CRect.getCPtr(rect));
  }

  public boolean stretchRect(ITexture srcText, SWIGTYPE_p_NLMISC__CRect srcRect, ITexture destText, SWIGTYPE_p_NLMISC__CRect destRect) {
    return nel3dJNI.IDriver_stretchRect(swigCPtr, this, ITexture.getCPtr(srcText), srcText, SWIGTYPE_p_NLMISC__CRect.getCPtr(srcRect), ITexture.getCPtr(destText), destText, SWIGTYPE_p_NLMISC__CRect.getCPtr(destRect));
  }

  public boolean isTextureRectangle(ITexture tex) {
    return nel3dJNI.IDriver_isTextureRectangle(swigCPtr, this, ITexture.getCPtr(tex), tex);
  }

  public boolean supportBloomEffect() {
    return nel3dJNI.IDriver_supportBloomEffect(swigCPtr, this);
  }

  public boolean supportNonPowerOfTwoTextures() {
    return nel3dJNI.IDriver_supportNonPowerOfTwoTextures(swigCPtr, this);
  }

  public void getZBufferPart(SWIGTYPE_p_std__vectorT_float_t zbuffer, SWIGTYPE_p_NLMISC__CRect rect) {
    nel3dJNI.IDriver_getZBufferPart(swigCPtr, this, SWIGTYPE_p_std__vectorT_float_t.getCPtr(zbuffer), SWIGTYPE_p_NLMISC__CRect.getCPtr(rect));
  }

  public boolean setRenderTarget(ITexture tex, long x, long y, long width, long height, long mipmapLevel, long cubeFace) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_0(swigCPtr, this, ITexture.getCPtr(tex), tex, x, y, width, height, mipmapLevel, cubeFace);
  }

  public boolean setRenderTarget(ITexture tex, long x, long y, long width, long height, long mipmapLevel) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_1(swigCPtr, this, ITexture.getCPtr(tex), tex, x, y, width, height, mipmapLevel);
  }

  public boolean setRenderTarget(ITexture tex, long x, long y, long width, long height) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_2(swigCPtr, this, ITexture.getCPtr(tex), tex, x, y, width, height);
  }

  public boolean setRenderTarget(ITexture tex, long x, long y, long width) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_3(swigCPtr, this, ITexture.getCPtr(tex), tex, x, y, width);
  }

  public boolean setRenderTarget(ITexture tex, long x, long y) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_4(swigCPtr, this, ITexture.getCPtr(tex), tex, x, y);
  }

  public boolean setRenderTarget(ITexture tex, long x) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_5(swigCPtr, this, ITexture.getCPtr(tex), tex, x);
  }

  public boolean setRenderTarget(ITexture tex) {
    return nel3dJNI.IDriver_setRenderTarget__SWIG_6(swigCPtr, this, ITexture.getCPtr(tex), tex);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx, long offsety, long x, long y, long width, long height, long mipmapLevel) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_0(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx, offsety, x, y, width, height, mipmapLevel);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx, long offsety, long x, long y, long width, long height) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_1(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx, offsety, x, y, width, height);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx, long offsety, long x, long y, long width) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_2(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx, offsety, x, y, width);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx, long offsety, long x, long y) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_3(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx, offsety, x, y);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx, long offsety, long x) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_4(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx, offsety, x);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx, long offsety) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_5(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx, offsety);
  }

  public boolean copyTargetToTexture(ITexture tex, long offsetx) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_6(swigCPtr, this, ITexture.getCPtr(tex), tex, offsetx);
  }

  public boolean copyTargetToTexture(ITexture tex) {
    return nel3dJNI.IDriver_copyTargetToTexture__SWIG_7(swigCPtr, this, ITexture.getCPtr(tex), tex);
  }

  public boolean getRenderTargetSize(SWIGTYPE_p_unsigned_int width, SWIGTYPE_p_unsigned_int height) {
    return nel3dJNI.IDriver_getRenderTargetSize(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(width), SWIGTYPE_p_unsigned_int.getCPtr(height));
  }

  public boolean fillBuffer(SWIGTYPE_p_CBitmap bitmap) {
    return nel3dJNI.IDriver_fillBuffer(swigCPtr, this, SWIGTYPE_p_CBitmap.getCPtr(bitmap));
  }

  public void setPolygonMode(IDriver.TPolygonMode mode) {
    nel3dJNI.IDriver_setPolygonMode(swigCPtr, this, mode.swigValue());
  }

  public long getMaxLight() {
    return nel3dJNI.IDriver_getMaxLight(swigCPtr, this);
  }

  public void setLight(short num, CLight light) {
    nel3dJNI.IDriver_setLight(swigCPtr, this, num, CLight.getCPtr(light), light);
  }

  public void enableLight(short num, boolean enable) {
    nel3dJNI.IDriver_enableLight__SWIG_0(swigCPtr, this, num, enable);
  }

  public void enableLight(short num) {
    nel3dJNI.IDriver_enableLight__SWIG_1(swigCPtr, this, num);
  }

  public void setAmbientColor(CRGBA color) {
    nel3dJNI.IDriver_setAmbientColor(swigCPtr, this, CRGBA.getCPtr(color), color);
  }

  public void setPerPixelLightingLight(CRGBA diffuse, CRGBA specular, float shininess) {
    nel3dJNI.IDriver_setPerPixelLightingLight(swigCPtr, this, CRGBA.getCPtr(diffuse), diffuse, CRGBA.getCPtr(specular), specular, shininess);
  }

  public void setLightMapDynamicLight(boolean enable, CLight light) {
    nel3dJNI.IDriver_setLightMapDynamicLight(swigCPtr, this, enable, CLight.getCPtr(light), light);
  }

  public IDriver.TPolygonMode getPolygonMode() {
    return IDriver.TPolygonMode.swigToEnum(nel3dJNI.IDriver_getPolygonMode(swigCPtr, this));
  }

  public boolean isVertexProgramSupported() {
    return nel3dJNI.IDriver_isVertexProgramSupported(swigCPtr, this);
  }

  public boolean isVertexProgramEmulated() {
    return nel3dJNI.IDriver_isVertexProgramEmulated(swigCPtr, this);
  }

  public boolean activeVertexProgram(CVertexProgram program) {
    return nel3dJNI.IDriver_activeVertexProgram(swigCPtr, this, CVertexProgram.getCPtr(program), program);
  }

  public void setConstant(long index, float arg1, float arg2, float arg3, float arg4) {
    nel3dJNI.IDriver_setConstant__SWIG_0(swigCPtr, this, index, arg1, arg2, arg3, arg4);
  }

  public void setConstant(long index, double arg1, double arg2, double arg3, double arg4) {
    nel3dJNI.IDriver_setConstant__SWIG_1(swigCPtr, this, index, arg1, arg2, arg3, arg4);
  }

  public void setConstant(long index, CVector value) {
    nel3dJNI.IDriver_setConstant__SWIG_2(swigCPtr, this, index, CVector.getCPtr(value), value);
  }

  public void setConstant(long index, CVectorD value) {
    nel3dJNI.IDriver_setConstant__SWIG_3(swigCPtr, this, index, CVectorD.getCPtr(value), value);
  }

  public void setConstant(long index, long num, SWIGTYPE_p_float src) {
    nel3dJNI.IDriver_setConstant__SWIG_4(swigCPtr, this, index, num, SWIGTYPE_p_float.getCPtr(src));
  }

  public void setConstant(long index, long num, SWIGTYPE_p_double src) {
    nel3dJNI.IDriver_setConstant__SWIG_5(swigCPtr, this, index, num, SWIGTYPE_p_double.getCPtr(src));
  }

  public void setConstantMatrix(long index, IDriver.TMatrix matrix, IDriver.TTransform transform) {
    nel3dJNI.IDriver_setConstantMatrix(swigCPtr, this, index, matrix.swigValue(), transform.swigValue());
  }

  public void setConstantFog(long index) {
    nel3dJNI.IDriver_setConstantFog(swigCPtr, this, index);
  }

  public boolean supportVertexProgramDoubleSidedColor() {
    return nel3dJNI.IDriver_supportVertexProgramDoubleSidedColor(swigCPtr, this);
  }

  public boolean supportCloudRenderSinglePass() {
    return nel3dJNI.IDriver_supportCloudRenderSinglePass(swigCPtr, this);
  }

  public void enableVertexProgramDoubleSidedColor(boolean doubleSided) {
    nel3dJNI.IDriver_enableVertexProgramDoubleSidedColor(swigCPtr, this, doubleSided);
  }

  public boolean supportTextureShaders() {
    return nel3dJNI.IDriver_supportTextureShaders(swigCPtr, this);
  }

  public boolean isWaterShaderSupported() {
    return nel3dJNI.IDriver_isWaterShaderSupported(swigCPtr, this);
  }

  public boolean isTextureAddrModeSupported(CMaterial.TTexAddressingMode mode) {
    return nel3dJNI.IDriver_isTextureAddrModeSupported(swigCPtr, this, mode.swigValue());
  }

  public void setMatrix2DForTextureOffsetAddrMode(long stage, SWIGTYPE_p_float mat) {
    nel3dJNI.IDriver_setMatrix2DForTextureOffsetAddrMode(swigCPtr, this, stage, SWIGTYPE_p_float.getCPtr(mat));
  }

  public boolean supportEMBM() {
    return nel3dJNI.IDriver_supportEMBM(swigCPtr, this);
  }

  public boolean isEMBMSupportedAtStage(long stage) {
    return nel3dJNI.IDriver_isEMBMSupportedAtStage(swigCPtr, this, stage);
  }

  public void setEMBMMatrix(long stage, SWIGTYPE_p_float mat) {
    nel3dJNI.IDriver_setEMBMMatrix(swigCPtr, this, stage, SWIGTYPE_p_float.getCPtr(mat));
  }

  public boolean supportPerPixelLighting(boolean specular) {
    return nel3dJNI.IDriver_supportPerPixelLighting(swigCPtr, this, specular);
  }

  public boolean supportBlendConstantColor() {
    return nel3dJNI.IDriver_supportBlendConstantColor(swigCPtr, this);
  }

  public void setBlendConstantColor(CRGBA col) {
    nel3dJNI.IDriver_setBlendConstantColor(swigCPtr, this, CRGBA.getCPtr(col), col);
  }

  public CRGBA getBlendConstantColor() {
    return new CRGBA(nel3dJNI.IDriver_getBlendConstantColor(swigCPtr, this), true);
  }

  public void finish() {
    nel3dJNI.IDriver_finish(swigCPtr, this);
  }

  public void flush() {
    nel3dJNI.IDriver_flush(swigCPtr, this);
  }

  public void enablePolygonSmoothing(boolean smooth) {
    nel3dJNI.IDriver_enablePolygonSmoothing(swigCPtr, this, smooth);
  }

  public boolean isPolygonSmoothingEnabled() {
    return nel3dJNI.IDriver_isPolygonSmoothingEnabled(swigCPtr, this);
  }

  public void swapTextureHandle(ITexture tex0, ITexture tex1) {
    nel3dJNI.IDriver_swapTextureHandle(swigCPtr, this, ITexture.getCPtr(tex0), tex0, ITexture.getCPtr(tex1), tex1);
  }

  public long getTextureHandle(ITexture tex) {
    return nel3dJNI.IDriver_getTextureHandle(swigCPtr, this, ITexture.getCPtr(tex), tex);
  }

  public boolean supportMADOperator() {
    return nel3dJNI.IDriver_supportMADOperator(swigCPtr, this);
  }

  public long getNumAdapter() {
    return nel3dJNI.IDriver_getNumAdapter(swigCPtr, this);
  }

  public boolean getAdapter(long adapter, SWIGTYPE_p_NL3D__IDriver__CAdapter desc) {
    return nel3dJNI.IDriver_getAdapter(swigCPtr, this, adapter, SWIGTYPE_p_NL3D__IDriver__CAdapter.getCPtr(desc));
  }

  public boolean setAdapter(long adapter) {
    return nel3dJNI.IDriver_setAdapter(swigCPtr, this, adapter);
  }

  public CVertexBuffer.TVertexColorType getVertexColorFormat() {
    return CVertexBuffer.TVertexColorType.swigToEnum(nel3dJNI.IDriver_getVertexColorFormat(swigCPtr, this));
  }

  public void startBench(boolean wantStandardDeviation, boolean quick, boolean reset) {
    nel3dJNI.IDriver_startBench__SWIG_0(swigCPtr, this, wantStandardDeviation, quick, reset);
  }

  public void startBench(boolean wantStandardDeviation, boolean quick) {
    nel3dJNI.IDriver_startBench__SWIG_1(swigCPtr, this, wantStandardDeviation, quick);
  }

  public void startBench(boolean wantStandardDeviation) {
    nel3dJNI.IDriver_startBench__SWIG_2(swigCPtr, this, wantStandardDeviation);
  }

  public void startBench() {
    nel3dJNI.IDriver_startBench__SWIG_3(swigCPtr, this);
  }

  public void endBench() {
    nel3dJNI.IDriver_endBench(swigCPtr, this);
  }

  public void displayBench(SWIGTYPE_p_NLMISC__CLog log) {
    nel3dJNI.IDriver_displayBench(swigCPtr, this, SWIGTYPE_p_NLMISC__CLog.getCPtr(log));
  }

  public boolean supportOcclusionQuery() {
    return nel3dJNI.IDriver_supportOcclusionQuery(swigCPtr, this);
  }

  public IOcclusionQuery createOcclusionQuery() {
    long cPtr = nel3dJNI.IDriver_createOcclusionQuery(swigCPtr, this);
    return (cPtr == 0) ? null : new IOcclusionQuery(cPtr, false);
  }

  public void deleteOcclusionQuery(IOcclusionQuery oq) {
    nel3dJNI.IDriver_deleteOcclusionQuery(swigCPtr, this, IOcclusionQuery.getCPtr(oq), oq);
  }

  public java.math.BigInteger getSwapBufferCounter() {
    return nel3dJNI.IDriver_getSwapBufferCounter(swigCPtr, this);
  }

  public void setCullMode(IDriver.TCullMode cullMode) {
    nel3dJNI.IDriver_setCullMode(swigCPtr, this, cullMode.swigValue());
  }

  public IDriver.TCullMode getCullMode() {
    return IDriver.TCullMode.swigToEnum(nel3dJNI.IDriver_getCullMode(swigCPtr, this));
  }

  public void enableStencilTest(boolean enable) {
    nel3dJNI.IDriver_enableStencilTest(swigCPtr, this, enable);
  }

  public boolean isStencilTestEnabled() {
    return nel3dJNI.IDriver_isStencilTestEnabled(swigCPtr, this);
  }

  public void stencilFunc(IDriver.TStencilFunc stencilFunc, int ref, long mask) {
    nel3dJNI.IDriver_stencilFunc(swigCPtr, this, stencilFunc.swigValue(), ref, mask);
  }

  public void stencilOp(IDriver.TStencilOp fail, IDriver.TStencilOp zfail, IDriver.TStencilOp zpass) {
    nel3dJNI.IDriver_stencilOp(swigCPtr, this, fail.swigValue(), zfail.swigValue(), zpass.swigValue());
  }

  public void stencilMask(long mask) {
    nel3dJNI.IDriver_stencilMask(swigCPtr, this, mask);
  }

  public final static class TMessageBoxId {
    public final static TMessageBoxId okId = new TMessageBoxId("okId", nel3dJNI.IDriver_okId_get());
    public final static TMessageBoxId yesId = new TMessageBoxId("yesId");
    public final static TMessageBoxId noId = new TMessageBoxId("noId");
    public final static TMessageBoxId abortId = new TMessageBoxId("abortId");
    public final static TMessageBoxId retryId = new TMessageBoxId("retryId");
    public final static TMessageBoxId cancelId = new TMessageBoxId("cancelId");
    public final static TMessageBoxId ignoreId = new TMessageBoxId("ignoreId");
    public final static TMessageBoxId idCount = new TMessageBoxId("idCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMessageBoxId swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMessageBoxId.class + " with value " + swigValue);
    }

    private TMessageBoxId(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMessageBoxId(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMessageBoxId(String swigName, TMessageBoxId swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMessageBoxId[] swigValues = { okId, yesId, noId, abortId, retryId, cancelId, ignoreId, idCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TMessageBoxType {
    public final static TMessageBoxType okType = new TMessageBoxType("okType", nel3dJNI.IDriver_okType_get());
    public final static TMessageBoxType okCancelType = new TMessageBoxType("okCancelType");
    public final static TMessageBoxType yesNoType = new TMessageBoxType("yesNoType");
    public final static TMessageBoxType abortRetryIgnoreType = new TMessageBoxType("abortRetryIgnoreType");
    public final static TMessageBoxType yesNoCancelType = new TMessageBoxType("yesNoCancelType");
    public final static TMessageBoxType retryCancelType = new TMessageBoxType("retryCancelType");
    public final static TMessageBoxType typeCount = new TMessageBoxType("typeCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMessageBoxType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMessageBoxType.class + " with value " + swigValue);
    }

    private TMessageBoxType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMessageBoxType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMessageBoxType(String swigName, TMessageBoxType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMessageBoxType[] swigValues = { okType, okCancelType, yesNoType, abortRetryIgnoreType, yesNoCancelType, retryCancelType, typeCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TMessageBoxIcon {
    public final static TMessageBoxIcon noIcon = new TMessageBoxIcon("noIcon", nel3dJNI.IDriver_noIcon_get());
    public final static TMessageBoxIcon handIcon = new TMessageBoxIcon("handIcon");
    public final static TMessageBoxIcon questionIcon = new TMessageBoxIcon("questionIcon");
    public final static TMessageBoxIcon exclamationIcon = new TMessageBoxIcon("exclamationIcon");
    public final static TMessageBoxIcon asteriskIcon = new TMessageBoxIcon("asteriskIcon");
    public final static TMessageBoxIcon warningIcon = new TMessageBoxIcon("warningIcon");
    public final static TMessageBoxIcon errorIcon = new TMessageBoxIcon("errorIcon");
    public final static TMessageBoxIcon informationIcon = new TMessageBoxIcon("informationIcon");
    public final static TMessageBoxIcon stopIcon = new TMessageBoxIcon("stopIcon");
    public final static TMessageBoxIcon iconCount = new TMessageBoxIcon("iconCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMessageBoxIcon swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMessageBoxIcon.class + " with value " + swigValue);
    }

    private TMessageBoxIcon(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMessageBoxIcon(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMessageBoxIcon(String swigName, TMessageBoxIcon swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMessageBoxIcon[] swigValues = { noIcon, handIcon, questionIcon, exclamationIcon, asteriskIcon, warningIcon, errorIcon, informationIcon, stopIcon, iconCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TCullMode {
    public final static TCullMode CCW = new TCullMode("CCW", nel3dJNI.IDriver_CCW_get());
    public final static TCullMode CW = new TCullMode("CW");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TCullMode swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TCullMode.class + " with value " + swigValue);
    }

    private TCullMode(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TCullMode(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TCullMode(String swigName, TCullMode swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TCullMode[] swigValues = { CCW, CW };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TStencilOp {
    public final static TStencilOp keep = new TStencilOp("keep", nel3dJNI.IDriver_keep_get());
    public final static TStencilOp zero = new TStencilOp("zero");
    public final static TStencilOp replace = new TStencilOp("replace");
    public final static TStencilOp incr = new TStencilOp("incr");
    public final static TStencilOp decr = new TStencilOp("decr");
    public final static TStencilOp invert = new TStencilOp("invert");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TStencilOp swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TStencilOp.class + " with value " + swigValue);
    }

    private TStencilOp(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TStencilOp(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TStencilOp(String swigName, TStencilOp swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TStencilOp[] swigValues = { keep, zero, replace, incr, decr, invert };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TStencilFunc {
    public final static TStencilFunc never = new TStencilFunc("never", nel3dJNI.IDriver_never_get());
    public final static TStencilFunc less = new TStencilFunc("less");
    public final static TStencilFunc lessequal = new TStencilFunc("lessequal");
    public final static TStencilFunc equal = new TStencilFunc("equal");
    public final static TStencilFunc notequal = new TStencilFunc("notequal");
    public final static TStencilFunc greaterequal = new TStencilFunc("greaterequal");
    public final static TStencilFunc greater = new TStencilFunc("greater");
    public final static TStencilFunc always = new TStencilFunc("always");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TStencilFunc swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TStencilFunc.class + " with value " + swigValue);
    }

    private TStencilFunc(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TStencilFunc(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TStencilFunc(String swigName, TStencilFunc swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TStencilFunc[] swigValues = { never, less, lessequal, equal, notequal, greaterequal, greater, always };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TPolygonMode {
    public final static TPolygonMode Filled = new TPolygonMode("Filled", nel3dJNI.IDriver_Filled_get());
    public final static TPolygonMode Line = new TPolygonMode("Line");
    public final static TPolygonMode Point = new TPolygonMode("Point");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TPolygonMode swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TPolygonMode.class + " with value " + swigValue);
    }

    private TPolygonMode(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TPolygonMode(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TPolygonMode(String swigName, TPolygonMode swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TPolygonMode[] swigValues = { Filled, Line, Point };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TMatrixCount {
    public final static TMatrixCount MaxModelMatrix = new TMatrixCount("MaxModelMatrix", nel3dJNI.IDriver_MaxModelMatrix_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMatrixCount swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMatrixCount.class + " with value " + swigValue);
    }

    private TMatrixCount(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMatrixCount(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMatrixCount(String swigName, TMatrixCount swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMatrixCount[] swigValues = { MaxModelMatrix };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TMatrix {
    public final static TMatrix ModelView = new TMatrix("ModelView", nel3dJNI.IDriver_ModelView_get());
    public final static TMatrix Projection = new TMatrix("Projection");
    public final static TMatrix ModelViewProjection = new TMatrix("ModelViewProjection");
    public final static TMatrix NumMatrix = new TMatrix("NumMatrix");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TMatrix swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TMatrix.class + " with value " + swigValue);
    }

    private TMatrix(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TMatrix(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TMatrix(String swigName, TMatrix swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TMatrix[] swigValues = { ModelView, Projection, ModelViewProjection, NumMatrix };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

  public final static class TTransform {
    public final static TTransform Identity = new TTransform("Identity", nel3dJNI.IDriver_Identity_get());
    public final static TTransform Inverse = new TTransform("Inverse");
    public final static TTransform Transpose = new TTransform("Transpose");
    public final static TTransform InverseTranspose = new TTransform("InverseTranspose");
    public final static TTransform NumTransform = new TTransform("NumTransform");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TTransform swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TTransform.class + " with value " + swigValue);
    }

    private TTransform(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TTransform(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TTransform(String swigName, TTransform swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TTransform[] swigValues = { Identity, Inverse, Transpose, InverseTranspose, NumTransform };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
